import 'package:flutter/material.dart';

class RegisterPage7 extends StatefulWidget {
  const RegisterPage7({Key? key}) : super(key: key);

  @override
  _RegisterPageState7 createState() => _RegisterPageState7();
}

class _RegisterPageState7 extends State<RegisterPage7> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('身份认证'),
        backgroundColor: Colors.purple,
        elevation: 0, // 移除阴影
      ),
      body: Column(
        crossAxisAlignment: CrossAxisAlignment.start,
        children: [
          Text(
            '身份认证',
            style: TextStyle(fontSize: 20.0, fontWeight: FontWeight.bold),
          ),
          SizedBox(height: 16.0),
          TextField(
            decoration: InputDecoration(
              labelText: '姓名',
              hintText: '请输入您的姓名',
              border: OutlineInputBorder(
                borderRadius: BorderRadius.circular(10.0),
                borderSide: BorderSide(),
              ),
              filled: true,
              fillColor: Colors.purple[100], // 输入框背景色为浅紫色
            ),
          ),
          SizedBox(height: 16.0),
          TextField(
            decoration: InputDecoration(
              labelText: '身份证号',
              hintText: '请输入您的身份证号',
              border: OutlineInputBorder(
                borderRadius: BorderRadius.circular(10.0),
                borderSide: BorderSide(),
              ),
              filled: true,
              fillColor: Colors.purple[100], // 输入框背景色为浅紫色
            ),
          ),
          SizedBox(height: 24.0),
          Text(
            '上传照片',
            style: TextStyle(fontSize: 16.0),
          ),
          SizedBox(height: 8.0),
          Row(
            mainAxisAlignment: MainAxisAlignment.center,
            children: [Container(
              width: 150.0,
              height: 150.0,
              decoration: BoxDecoration(
                border: Border.all(), // 你可以添加颜色和宽度以定义边框样式
                borderRadius: BorderRadius.circular(10.0),
              ),
              child: Row( // 使用 Row 并将 mainAxisAlignment 设置为 center 来水平居中内容
                mainAxisAlignment: MainAxisAlignment.center,
                children: <Widget>[
                  IconButton(
                    icon: Icon(
                      Icons.camera_alt,
                      color: Colors.purple[500],
                    ),
                    iconSize: 50.0,
                    onPressed: () {
                      // 处理图片上传逻辑
                    },
                  ),
                ],
              ),
            ),],
          ),


          SizedBox(height: 24.0),
          Row(
            mainAxisAlignment: MainAxisAlignment.center,
            children: [

              ElevatedButton(
                onPressed: () {
                  // 处理提交逻辑
                },
                child: Text('提交'),
                style: ElevatedButton.styleFrom(
                  primary: Colors.purple[700], // 按钮背景色为深紫色
                ),
              ),
            ],
          )


        ],
      ),

      bottomNavigationBar: BottomNavigationBar(
        showSelectedLabels: true,
        // 如果想要隐藏选中时的文字
        showUnselectedLabels: true,
        // 如果想要显示未选中时的文字
        type: BottomNavigationBarType.fixed,

        selectedItemColor: Colors.purple,
        // 选中项的颜色
        unselectedItemColor: Colors.grey,
        // 未选中项的颜色

        items: const <BottomNavigationBarItem>[
          BottomNavigationBarItem(
            icon: Icon(Icons.people),
            label: '身份认证',
          ),
          BottomNavigationBarItem(
            icon: Icon(Icons.home),
            label: '首页',
          ),
          BottomNavigationBarItem(
            icon: Icon(Icons.face),
            label: '我的',
          ),
        ],
      ),
    );
  }
}
